import game.*;
import gameserver.*;
import com.sun.net.httpserver.*;
import java.io.IOException;
import java.net.InetSocketAddress;

class lostbase {
	
	 public static void main(String[] args) {
		 

		Game game = new Game();
		
		HttpServer server;
		
		try {

			server = HttpServer.create(new InetSocketAddress(8081), 0);
			server.createContext("/", new GameHandlerStatic("www/index.html"));
	        server.createContext("/main", new GameHandler(game));
	        server.setExecutor(new GameExecutor()); // creates a default executor
	        server.start();

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	 }
	
}

